package com.hh.core.property;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = ShiroProperty.SHIOR_PREFIX)
public class ShiroProperty {

	public static final String SHIOR_PREFIX = "shiro";
	
	private Integer sessionInvalidateTime = 30 * 60;  //session 失效时间（默认为30分钟 单位：秒）

    private Integer sessionValidationInterval = 15 * 60;  //session 验证失效时间（默认为15分钟 单位：秒）
    //默认的登陆访问url
    private String loginUrl = "/login";
    //登录成功后跳转地址
    private String successUrl = "/admin";
    //没有权限跳转的url
    private String unauthorizedUrl = "/unAuth";
    //不需要认证url
    private String anonUrl = "/static/**";
    //需要登录认证的url
    private String authcUrl = "/admin/**";
	
    private Integer rememberMeDays = 7 * 24 * 60 * 60;
    
	public String getLoginUrl() {
		return loginUrl;
	}

	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}

	public String getSuccessUrl() {
		return successUrl;
	}

	public void setSuccessUrl(String successUrl) {
		this.successUrl = successUrl;
	}

	public String getUnauthorizedUrl() {
		return unauthorizedUrl;
	}

	public void setUnauthorizedUrl(String unauthorizedUrl) {
		this.unauthorizedUrl = unauthorizedUrl;
	}

	public Integer getRememberMeDays() {
		return rememberMeDays;
	}

	public void setRememberMeDays(Integer rememberMeDays) {
		this.rememberMeDays = rememberMeDays;
	}

	public String getAnonUrl() {
		return anonUrl;
	}

	public void setAnonUrl(String anonUrl) {
		this.anonUrl = anonUrl;
	}

	public String getAuthcUrl() {
		return authcUrl;
	}

	public void setAuthcUrl(String authcUrl) {
		this.authcUrl = authcUrl;
	}

	public Integer getSessionInvalidateTime() {
		return sessionInvalidateTime;
	}

	public void setSessionInvalidateTime(Integer sessionInvalidateTime) {
		this.sessionInvalidateTime = sessionInvalidateTime;
	}

	public Integer getSessionValidationInterval() {
		return sessionValidationInterval;
	}

	public void setSessionValidationInterval(Integer sessionValidationInterval) {
		this.sessionValidationInterval = sessionValidationInterval;
	}
    
    
}
